-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move front end source files to web_src and generate index.js minify version #8440
Conversation
|
Shouldn't we lock to a specific version of the minifier? Otherwise CI build might differ from the committed version. |
.PHONY: webpack | ||
webpack: npm | ||
npm install webpack -g | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unnecessary, just run npm install --save-dev webpack
which will add it as a proper dependency. To run it, use npx webpack <args>
afterwards.
This doesn't really solve #8430. All that webpack config does is copy source to destination. If you want to minify, you would at least want to add a minify plugin, for which I recommend https://github.com/webpack-contrib/terser-webpack-plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a package.json
and handle dependencies there. We also need to set Webpack to production mode for the final compile, either in the Webpack config or in the command for it.
@gary-kim we already have a |
🤦 Forgot about LESS. |
Fix #8430 and this will also reduce gitea package size since we moved frontend source files from public directory.